from langchain_core.tools import tool


@tool
async def get_weather(city: str) -> str:
    """获取某城市的天气情况"""
    print(f"函数被调用, 查询 {city} 的天气")
    fake_data = {
        "北京": "晴，28℃",
        "上海": "多云，30℃",
        "东京": "小雨，25℃",
    }
    return fake_data.get(city, f"未查询到 {city} 的天气")


